/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package intershopxssscanner.gui;

import java.io.File;
import javax.swing.DefaultListModel;
import javax.swing.JList;
import javax.swing.JTextArea;
import javax.swing.JTextPane;

/**
 *
 * @author Willem
 */
public class GuiModel {
    private JList workList;
    private JTextPane workArea;
    private JList workDoneList;
    private JTextPane fileViewTextPane;

    GuiModel(JList WorkList,JTextPane workArea,JList workDoneList) {
        this.workList = WorkList;
        this.workArea=workArea;
        this.workDoneList=workDoneList;
    }
    
    public void addFilesToWorkList(File[] files){
        for(File f : files){
            getModelWorkList().addElement(f);
        }        
    }
    
    public DefaultListModel getModelWorkList(){
        DefaultListModel model = (DefaultListModel) getWorkList().getModel();
        return model;
    }

    /**
     * @return the workList
     */
    public JList getWorkList() {
        return workList;
    }

    /**
     * @param workList the workList to set
     */
    public void setWorkList(JList workList) {
        this.workList = workList;
    }

    /**
     * @return the workArea
     */
    public JTextPane getWorkArea() {
        return workArea;
    }

    /**
     * @param workArea the workArea to set
     */
    public void setWorkArea(JTextPane workArea) {
        this.workArea = workArea;
    }
    
    public DefaultListModel getModelWorkDoneList(){
        DefaultListModel model = (DefaultListModel) getWorkDoneList().getModel();
        return model;
    }

    /**
     * @return the workDoneList
     */
    public JList getWorkDoneList() {
        return workDoneList;
    }

    /**
     * @param workDoneList the workDoneList to set
     */
    public void setWorkDoneList(JList workDoneList) {
        this.workDoneList = workDoneList;
    }

    

    /**
     * @return the fileViewTextPane
     */
    public JTextPane getFileViewTextPane() {
        return fileViewTextPane;
    }

    /**
     * @param fileViewTextPane the fileViewTextPane to set
     */
    public void setFileViewTextPane(JTextPane fileViewTextPane) {
        this.fileViewTextPane = fileViewTextPane;
    }
    
}
